<blockquote class="layui-elem-quote">
  <div class="layui-inline">
    <i class="layui-icon layui-icon-list layui-head-icon"></i>
    <span class="layui-font-16 layui-font-green">区间管理</span>
  </div>
  <div class="layui-pull-right">
    <a class="layui-btn layui-btn-primary layui-border-green" 
    data-url="{:url('/store/integral/goods/interval/create')}"
    data-title="添加商品分类"
    data-w = "600px"
    data-h = "700px"
    id="add">添加区间</a>
  </div>
</blockquote>
<div class="layui-card">
  <div class="layui-card-body">
    <form class="layui-form">
      <table class="layui-table">
        <thead>
          <tr>
          <th>ID</th>
          <th>区间名称</th>
          <th>状态</th>
          <th>创建时间</th>
          <th>更新时间</th>
          <th>操作</th>
          </tr> 
        </thead>
      <tbody>
      {foreach $list as $vo}
      <tr>
        <td>{$vo.id}</td>
        <td>{$vo.interval_name}</td>
        <td>
            {empty name='$vo.status'}
              <span class="layui-font-red">禁用</span>
            {else/}  
              <span class="layui-font-green">启用</span>
            {/empty}
        </td>
        <td>{$vo.create_time}</td>
        <td>{$vo.update_time}</td>
        <td>
          {empty name='$vo.status'}
          <a class="layui-btn layui-btn-sm layui-btn-primary layui-border-green switch"
            data-url="{:url('/store/integral/goods/interval/switch')}"
            data-status="1" 
            data-id="{$vo.id}">启用</a>
          {else/}  
          <a class="layui-btn layui-btn-sm layui-btn-primary layui-border-red switch" data-url="{:url('/store/integral/goods/interval/switch')}" data-status="0" data-id="{$vo.id}">禁用</a>
          {/empty}
          <a class="layui-btn layui-btn-sm edit" data-url="{:url('/store/integral/goods/interval/edit',['id'=> $vo.id])}"
            data-title="编辑区间"
            data-w = "600px"
            data-h = "700px">编辑</a>
          <a class="layui-btn layui-btn-sm layui-btn-danger del" data-url="{:url('/store/integral/goods/interval/delete',['id'=> $vo.id])}">删除</a>
        </td>
      </tr>
      {/foreach}
      </tbody>
      </table>
  </form> 
  </div>
</div>